<!--功能：商品列表可块级显示也可条状显示-->
<!--创建人：李志伟-->
<!--时间：2017年2月7日11:57:58-->
<script src="__TEMP__/{$style}/public/js/goods/controlGoods.js"></script>
<script src="__TEMP__/{$style}/public/js/ns_collections.js" type="text/javascript"></script>
<!-- 地址选择 _start -->
<script type="text/javascript" src="__TEMP__/{$style}/public/js/ns_select_region.js"></script>
<input type="hidden" id="hidden_province" value="{$user_location.province}" />
<input type="hidden" id="hidden_city" value="{$user_location.city}" />
<div class="main">
	<div id="filter">
		<!--排序-->
		<form method="get" name="listform" action="" style="position: relative;">
			<div class="fore1">
				<dl class="order">
				<!-- 默认 -->
				{if condition=" $order=='' "}<dd class="first curr">{else/}<dd>{/if}
					<a href="{:__URL('SHOP_MAIN/goods/goodslist',$url_parameter_not_order)}">{:lang('goods_comprehensive')}</a>
					</dd>
				<!-- 销量 -->
				{if condition=" $order=='sales' "}
					<dd class="curr">
					{if condition = " $sort=='asc' "}
						<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=sales&sort=desc'.$attr_url)}">{:lang('goods_sales_volume')}
						<b style="background-position:-23px -169px"></b>
					{else/}
						<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=sales&sort=asc'.$attr_url)}">{:lang('goods_sales_volume')}
						<b class="icon-order-DESCending"></b>
					{/if}
				{else/}
					<dd>
						<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=sales&sort=desc'.$attr_url)}">{:lang('goods_sales_volume')}
						<b class="icon-order-DESCending"></b>
				{/if}
						</a>
					</dd>
					
				<!-- 新品 -->
				{if condition = " $order=='is_new' "}
					<dd class="curr">
						{if condition = " $sort=='asc' "}
							<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=is_new&sort=desc'.$attr_url)}">{:lang('goods_new')}
							<b style="background-position:-23px -169px"></b>
						{else/}
							<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=is_new&sort=asc'.$attr_url)}">{:lang('goods_new')}
							<b class="icon-order-DESCending"></b>
						{/if}
				{else/}
					<dd>
						<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=is_new&sort=desc'.$attr_url)}">{:lang('goods_new')}
							<b class="icon-order-DESCending"></b>
				{/if}
						</a>
					</dd>
				
				<!-- 价格 -->
				
				{if condition = " $order=='price' "}
					<dd class="curr">
						{if condition = " $sort=='asc' && $order=='price' "}
							<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=price&sort=desc'.$attr_url)}">{:lang('goods_price')}
							<b style="background-position:-23px -169px"></b>
							
						{else/}
							<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=price&sort=asc'.$attr_url)}">{:lang('goods_price')}
							<b class="icon-order-DESCending"></b>
						{/if}
					{else/}
					<dd>
							<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_order.'&obyzd=price&sort=desc'.$attr_url)}">{:lang('goods_price')}
							<b class="icon-order-DESCending"></b>
					{/if}
						</a>
					</dd>
				</dl>
				<div class="total">{:lang('goods_total')} <span class="color" id="shops_count">{$total_count}</span>{:lang('goods_goods')}&nbsp;</div>
				<dl class="order f-right">
					<!-- <dd class="first">
						<a href="javascript:;" style="position: relative;" onmouseout="hideAddress(this)" onmousemove="showAddress(this)">所在地<i class="address_home_down"></i> </a>
					</dd> -->
				</dl> 
			</div>
			 <div class="fore2">
				<div class="filter-btn">
					<span class="distribution">{:lang('goods_delivery_to')}</span>
					<div class="region-chooser-container region-chooser" style="z-index: 3">
						<div class="region-chooser-selected">
							<div class="region js-region">
								<font>{$user_location.province}{$user_location.city}<i></i></font>
							</div>
						</div>
						<div class="region-chooser-box" id="region-chooser-box" style="display: none;">
							<div class="region-chooser-close"></div>
							<div class="region-tabs">
								<div class="region-tab selected" data-region-level="1" style="display: block">
									{$user_location.province}<i></i>
								</div>
								<div class="region-tab" data-region-level="2" style="display: block">
									{$user_location.city}<i></i>
								</div>
								<div class="region-tab " data-region-level="3" style="display: block">
									{:lang('goods_select_district_or_county')}<i></i>
								</div>
							</div>
							<div class="region-items" data-region-level="1" style="display: block;"></div>
							<div class="region-items" data-region-level="2" style="display: none;"></div>
							<div class="region-items" data-region-level="3" style="display: none;"></div>
						</div>
						<div style="clear: both;"></div>
					</div>
					
					{if condition = "$shipping_fee !='' && $shipping_fee ==0"}
					<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_shipping.$attr_url)}" class="filter-tag curr">
					{else/}
					<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter.'&fee=0'.$attr_url)}" class="filter-tag">
					{/if}
						<i class="icon"></i><span class="text">{:lang('goods_free_shipping')}</span>
					</a>
					
					{if condition = "$stock !='' && $stock>=0"}
					<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter_not_stock.$attr_url)}" class="filter-tag curr">
					{else/}
					<a href="{:__URL('SHOP_MAIN/goods/goodslist?'.$url_parameter.'&jxsyh=0'.$attr_url)}" class="filter-tag ">
					{/if}
						<i class="icon"></i><span class="text">{:lang('goods_show_only_goods')}</span>
					</a>
				</div>
				<div class="filter-mod">
					<!-- 选中样式为a标签添加curr样式 -->
					<div class="nch-sortbar-location">{:lang('goods_location')}：
						<div class="select-layer">
							<div class="holder">
								<em nc_type="area_name">
								{if condition="$province_name == ''"}
								{:lang('goods_unlimited_area')}
								{else/}
								{$province_name}
								{/if}
								</em>
							</div>
							<div class="selected">
								<a nc_type="area_name">
								{if condition="$province_name == ''"}
								{:lang('goods_unlimited_area')}
								{else/}
								{$province_name}
								{/if}
								</a>
							</div>
							<i class="direction"></i>
						</div>
					</div>
					<a href="javascript:;"  data-type="1" title="{:lang('list_model')}" class="filter-type filter-type-list js-filter-type">
						<span class="filter-type-icon"></span>
					</a>
					<a href="javascript:;" data-type="0" title="{:lang('big_picture_mode')}" class="filter-type filter-type-grid curr js-filter-type">
						<span class="filter-type-icon"></span>
					</a>
				</div>
			</div>
			<ul class="options">
				<div class="filter-detailc" id="addressDraw">
					<dl class="location-hots">
						<dt>{:lang('goods_common_area')}</dt>
						<dd><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=1&province_name='.lang('beijing').$attr_url)}">北京</a></dd>
						<dd><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=2&province_name='.lang('tianjin').$attr_url)}">{:lang('tianjin')}</a></dd>
						<dd><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=9&province_name='.lang('shanghai').$attr_url)}">{:lang('shanghai')}</a></dd>
					</dl>
					<dl class="location-all">
						<dt>{:lang('goods_province')}</dt>
						<dd>
							<ul>
								<li>
									<p class="lt">A</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=12&province_name='.lang('anhui').$attr_url)}">{:lang('anhui')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=33&province_name='.lang('aomen').$attr_url)}">{:lang('aomen')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">C</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=22&province_name='.lang('chongqing').$attr_url)}">{:lang('chongqing')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">F</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=13&province_name='.lang('fujian').$attr_url)}">{:lang('fujian')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">G</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=19&province_name='.lang('guangdong').$attr_url)}">{:lang('guangdong')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=28&province_name='.lang('gansu').$attr_url)}">{:lang('gansu')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=20&province_name='.lang('guangxi').$attr_url)}">{:lang('guangxi')}</a></span> 
										<span><a href="">{:lang('guizhou')}</a></span> 
									</p>
								</li>
							</ul>
							<ul>
								<li>
									<p class="lt">H</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=21&province_name='.lang('hainan').$attr_url)}">{:lang('hainan')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=3&province_name='.lang('hebei').$attr_url)}">{:lang('hebei')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=16&province_name='.lang('henan').$attr_url)}">{:lang('henan')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=8&province_name='.lang('heilongjiang').$attr_url)}">{:lang('heilongjiang')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=17&province_name='.lang('hebei').$attr_url)}">{:lang('hebei')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=18&province_name='.lang('hunan').$attr_url)}">{:lang('hunan')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">J</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=10&province_name='.lang('jiangsu').$attr_url)}">{:lang('jiangsu')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=14&province_name='.lang('jiangxi').$attr_url)}">{:lang('jiangxi')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=7&province_name='.lang('jilin').$attr_url)}">{:lang('jilin')}</a></span> 
									</p>
								</li>
							</ul>
							<ul>
								<li>
									<p class="lt">N</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=6&province_name='.lang('liaoning').$attr_url)}">{:lang('liaoning')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=5&province_name='.lang('neimenggu').$attr_url)}">{:lang('neimenggu')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=30&province_name='.lang('ningxia').$attr_url)}">{:lang('ningxia')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">Q</p>
									<p class="lc"><span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=29&province_name='.lang('qinghai').$attr_url)}">{:lang('qinghai')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">S</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=15&province_name='.lang('shandong').$attr_url)}">{:lang('shandong')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=4&province_name='.lang('shanxi').$attr_url)}">{:lang('shanxi')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=27&province_name='.lang('shan_xi').$attr_url)}">{:lang('shan_xi')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=23&province_name='.lang('sichuan').$attr_url)}">{:lang('sichuan')}</a></span> 
									</p>
								</li>
							</ul>
							<ul>
								<li>
									<p class="lt">T</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=34&province_name='.lang('taiwan').$attr_url)}">{:lang('taiwan')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">X</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=26&province_name='.lang('xizang').$attr_url)}">{:lang('xizang')}</a></span> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=31&province_name='.lang('xinjiang').$attr_url)}">{:lang('xinjiang')}</a></span> 
										<span><a href="">{:lang('hongkong')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">Y</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=25&province_name='.lang('yunnan').$attr_url)}">{:lang('yunnan')}</a></span> 
									</p>
								</li>
								<li>
									<p class="lt">Z</p>
									<p class="lc"> 
										<span><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.'&province_id=11&province_name='.lang('zhejiang').$attr_url)}">{:lang('zhejiang')}</a></span> 
									</p>
								</li>
							</ul>
						</dd>
					</dl>
					<p class="oreder-default"><a href="{:__URL('SHOP_MAIN/goods/goodslist?',$url_parameter_not_province_id.$attr_url)}">{:lang('goods_unlimited_area')}</a></p>
				</div>
			</ul>
		</form>
	</div>
	<!--主体商品内容展示-->
	<form name="compareForm" action="" method="post" onsubmit="" id="table_list">
		<div class="goodsList js-list-type" style="display: none;">
		<!-- JS加载商品列表数据【列表模式】 -->
		{foreach name="goods_list['data']" item="goods"} 
			<ul class="clearfix">
				<li class="thumb">
					<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" title="{$goods.goods_name}">
						<img src="{:__IMG($default_goods_img)}" data-original="{:__IMG($goods['pic_cover_mid'])}" class="pic_img_206 lazy_load" style="display: inline;">
					</a>
				</li>
				<li class="goodsName">
					<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" title="{$goods.goods_name}">{$goods.goods_name}</a>
				</li>
				<li class="list_price">{:lang('goods_market_value')}： <font class="market">￥{$goods.market_price}</font><br> {:lang('goods_shop_price')}： <font class="shop">{$goods.display_price}</font> <br></li>
				<li class="action">
					<a href="javascript:;" class="action-btn collet-btn  curr" onclick="collectionGoods({$goods.goods_id},'goods','{$goods.goods_name}',this,true)"> 
					{if condition="$goods.is_favorite>0"}{:lang('goods_collected')}
					{else/}
					{:lang('goods_collection')}
					{/if}
					</a>
					{in name="$goods['point_exchange_type']" value="0,2"}
						{if condition="$goods['goods_type'] == 1 "}
						<!-- 实物商品 -->
							<!-- 是否支持预售 -->
							{if $goods['is_open_presell'] == 0}
								{if condition="$goods['stock'] neq '0'"}
									<a href="javascript:ShowGoodsAttribute({$goods.goods_id},'{$goods.goods_name}',{$goods.pic_id},this,{if condition='$goods.max_buy==0' }{$goods.stock}{else/}{$goods.max_buy}{/if},{$goods.state});" class="action-btn addcart-btn add-cart">{:lang('goods_add_cart')}</a>
								{else/}
									<a href="javascript:;" class="action-btn addcart-btn add-cart" style="background: #bbb;">{:lang('goods_add_cart')}</a>
								{/if}
							{else/}
								<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" class="action-btn addcart-btn add-cart" title="{:lang('view_details')}">{:lang('view_details')}</a>
							{/if}
						{else/}
							<!-- 虚拟商品，没有加入购物车 -->
							<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" class="action-btn addcart-btn add-cart" title="{:lang('view_details')}">{:lang('view_details')}</a>
						{/if}
					{else/}
						<a href="{:__URL('SHOP_MAIN/goods/goodsInfoPointExchange','goodsid='.$goods['goods_id'])}" target="_blank" class="action-btn addcart-btn add-cart" title="{:lang('goods_exchange')}">{:lang('goods_exchange')}</a>
					{/in}
				</li>
			</ul>
		{/foreach}
		</div>
		<ul class="list-grid clearfix js-list-grid">
			{foreach name="goods_list['data']" item="goods" key="k"}
			<li class="item {if condition='$k neq 0 && ($k+1)%4==0'}last{/if}">
				<div class="item-con">
					{if condition="$goods['is_hot'] eq 1"}
						<img src="__TEMP__/{$style}/public/images/hot.png" alt="" class="recommend">
					{/if}
					{if condition="$goods['is_recommend'] eq 1"}
						<img src="__TEMP__/{$style}/public/images/recommend.png" alt="" class="recommend">
					{/if}
					{if condition="$goods['is_new'] eq 1"}
						<img src="__TEMP__/{$style}/public/images/new.png" alt="" class="recommend">
					{/if}
					<div class="item-pic">
						<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" title="{$goods.goods_name}" target="_blank">
							<img src="{:__IMG($default_goods_img)}" class="lazy_load" data-original="{:__IMG($goods['pic_cover_mid'])}">
						</a>
					</div>
					<div class="item-info">
						<div class="item-price"><em class="sale-price money-color">{$goods.display_price}</em></div>
						<div class="item-name"><a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" title="{$goods.goods_name}">{$goods.goods_name}</a></div>
						<div class="item-con-info">
							<div class="fr" style="float: left;margin-right: 5px;">
								<div class="item-add-cart">
									{in name="$goods['point_exchange_type']" value="0,2"}
										{if condition="$goods['goods_type'] == 1 "}
											<!-- 实物商品 -->
											{if $goods['is_open_presell'] == 0}
												{if condition="$goods['stock'] neq '0'"}
													<a href="javascript:ShowGoodsAttribute({$goods.goods_id},'{$goods.goods_name}',{$goods.pic_id},this,{if condition='$goods.max_buy==0' }{$goods.stock}{else/}{$goods.max_buy}{/if},{$goods.state});" class="add-cart" title="{:lang('goods_add_cart')}"><i class="icon-cart"></i>{:lang('goods_add_cart')}</a>
												{else /}
													<a href="javascript:;" class="add-cart" title="{:lang('goods_add_cart')}" style="background: #bbb;"><i class="icon-cart"></i>{:lang('goods_add_cart')}</a>
												{/if}
											{else/}
												<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" class="add-cart" title="{:lang('view_details')}">{:lang('view_details')}</a>
											{/if}									
										{else/}
											<!-- 虚拟商品，没有加入购物车 -->
											<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" class="add-cart" title="{:lang('view_details')}">{:lang('view_details')}</a>
										{/if}
									{else/}
										<a href="{:__URL('SHOP_MAIN/goods/goodsInfoPointExchange','goodsid='.$goods['goods_id'])}" target="_blank" class="add-cart" title="{:lang('goods_exchange')}">{:lang('goods_exchange')}</a>
									{/in}
								</div>
							</div>
							<div class="fl">
								<div class="item-operate {if condition="$goods.is_favorite>0"}is_favorite{/if}">
										<a href="javascript:;" class="operate-btn collet-btn  goods-collect" onclick="collectionGoods({$goods.goods_id},'goods','{$goods.goods_name}',this,false)">
										<i {if condition="$goods.is_favorite>0"}style="background-position:-107px -11px;"{/if} data-log-id="{$goods.is_favorite}"></i>
										<span> {if condition="$goods.is_favorite>0"}{:lang('goods_collected')}
					 							{else/}{:lang('goods_collection')}{/if}
					 					</span>
									</a>
								</div>
							</div>
							{if condition="$custom_service['value']['service_addr'] != '' "}
							<a href="{$custom_service['value']['service_addr']}" title="{:lang('contact_customer_service')}" target="_blank" class="customerService">
								<i class="kefu"></i>
							</a>
							{/if}
						</div>
					</div>
				</div>
			</li>
			{/foreach}
		<!-- JS加载商品列表数据【大图模式】 -->
		</ul>
		{if condition="$total_count==0"}
		<div class="tip-box">
			<i class="tip-icon"></i>
			<div class="tip-text">Sorry！{:lang('goods_no_goods_you_want')}……</div>
		</div>
		{/if}
		
		{include file='shop/blue/Goods/controlPopUpGoodsSkuAttribute'/}
		<!--分页-->
		<div class="js-show-page">
		{include file='shop/blue/controlCommonPage'/}
		</div>
	</form>
</div>